import java.util.Arrays;

public class BubblingSort {

    static Integer [] array = {0,1,6,3,8,9,10,100,20};

    /**
     * 冒泡排序
     */
    public static void main(String[] args) {
        for (int i = 0; i < array.length; i++) {
            for (int j = i + 1; j < array.length; j++) {
                if (array[i] > array[j]){
                    int temp = array[i];
                    array[i] = array[j];
                    array[j] = temp;
                }
            }
        }
        System.out.print(Arrays.toString(array));
    }

}
